<template>
	<view class="Invitation">
		<view class="toubutupian">
			<image class="tupian" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/1cf9d61fc711420fae1913e3b1391fbc.png"
			 mode=""></image>

		</view>
		<view class="annniu">
			<image @click="naviageToPage('/pages/parity/parity?type=6&id=49&title=掌柜推荐')" class="anntupain" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/f24a60c0f605403b9e88e7c614b75c8a.png"
			 mode=""></image>
		</view>
		<view class="shangpin">
			<image class="shangpinimg" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/2779d5b72ae34c1686caff438a9f6d87.png"
			 mode=""></image>
			<view class="feilei">
				<view class="chanpin">
					新鲜产品
				</view>
				<view class="chanpin">
					一分起购
				</view>
				<view class="chanpin">
					平台优选
				</view>
				<view class="chanpin">
					30分钟送达
				</view>
			</view>

		</view>
		<view class="wenzhi">
			实际商品可能因城市不同而有所差异～
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				p: ''
			};
		},
		onLoad(options) {
			if (options.p) {
				console.log(options.p)
				this.$store.commit('setStorageCode', options.p)
			}
			wx.hideHomeButton()
		},
		methods: {
			naviageToPage(page) {
				if (this.$store.state.userInfo.accessToken) {
					uni.navigateTo({
						url: "/pagesA/xinrenzhuanxing/xinrenzhuanxing"
					})
					// uni.showModal({
					// 	title: "提示",
					// 	content: "您已领取过新人优惠",
					// 	confirmText: "继续分享",
					// 	cancelText: "新人专区",
					// 	success: (res) => {
					// 		if (res.confirm) {
					// 			uni.navigateTo({
					// 				url: "/pagesA/qiandao/tuijianyouli"
					// 			})
					// 		} else {
					// 			// uni.switchTab({
					// 			// 	url:"../index/indexs"
					// 			// })
					// 			uni.navigateTo({
					// 				url: "/pagesA/xinrenzhuanxing/xinrenzhuanxing"
					// 			})
					// 		}
					// 	}
					// })
				} else {
					uni.navigateTo({
						url: "../public/login"
					})
				}
			}
		},

	}
</script>

<style lang="scss">
	.Invitation {
		background-color: #F9F9F9;

		.wenzhi {
			width: 700rpx;
			height: 90rpx;
			line-height: 90rpx;
			text-align: center;
			font-size: 20rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #475A44;
			background-color: #AFE47A;
			margin-left: 24rpx;
			position: relative;
			top: -25rpx;

			border-radius: 0rpx 0rpx 16rpx 16rpx;

		}

		.shangpin {
			width: 702rpx;
			height: 862rpx;
			margin-left: 24rpx;
			position: relative;

			.feilei {
				height: 40rpx;
				width: 702rpx;

				position: absolute;
				left: 0;
				top: 70rpx;
				z-index: 99;
				display: flex;
				align-items: center;
				justify-content: space-around;

				.chanpin {
					width: 140rpx;
					height: 40rpx;
					background: #FFFFFF;
					border-radius: 23rpx;
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #36B542;
					display: flex;
					align-items: center;
					justify-content: center;
				}

			}

			.shangpinimg {
				width: 702rpx;
				height: 862rpx;
				position: absolute;
				left: 0;
				top: -20rpx;
			}
		}

		.annniu {
			width: 702rpx;
			height: 88rpx;
			margin-left: 24rpx;
			position: relative;

			.anntupain {
				width: 702rpx;
				height: 88rpx;
				position: absolute;
				left: 0;
				top: -60rpx;
			}
		}

		.toubutupian {
			width: 750rpx;
			height: 520rpx;

			.tupian {
				width: 750rpx;
				height: 520rpx;
			}
		}

		.btn {
			margin: 110px auto 0;
			width: 77%;
			height: 45px;
			background-color: #EF570D;
			text-align: center;
			line-height: 45px;
			color: #fff;
			border-radius: 45rpx;

		}
	}
</style>
